#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main() 
{
    long long n = 0;
    long long k = 0;
    scanf("%lld %lld", &n, &k);
    long long count = 0;
    if (k)
    {
        for (long i = k + 1; i <= n; i++)
        {
            count += (n / i) * (i - k);
            if (n % i >= k)
            {
                count += (n % i) - k + 1;
            }
        }
        printf("%lld", count);
    }
    else 
    {
        printf("%lld", n * n);
    }
    return 0;
}